<?php include('./templete/public/head.php') ?>
<body>
<?php include('./templete/public/foot.php') ?>
<!--index-banner-->
<div id="slider" class="mui-slider index-banner" >
    <div class="mui-slider-group mui-slider-loop">
        <!-- 额外增加的一个节点(循环轮播：第一个节点是最后一张轮播) -->
        <div class="mui-slider-item mui-slider-item-duplicate">
            <a href="<?php echo $banner[count($banner)-1]['link']?>"><img src="<?php echo $banner[count($banner)-1]['img_url_cn']?>"/></a>
        </div>
        <!-- 第一张 -->
        <?php foreach ($banner as $v){?>
            <div class="mui-slider-item">
                <a href="<?php echo $v['link']?>"><img src="<?php echo $v['img_url_cn']?>"/></a>
            </div>
        <?php }?>
        <!-- 额外增加的一个节点(循环轮播：最后一个节点是第一张轮播) -->
        <div class="mui-slider-item mui-slider-item-duplicate">
            <a href="<?php echo $banner[0]['link']?>"><img src="<?php echo $banner[0]['img_url_cn']?>"/></a>
        </div>
    </div>
</div>
<!--分类-->
<div class="index-fenlei">
    <ul>
<!--        <li>-->
<!--            <a href="--><?php //echo url('travel/strategy',['type'=>1]) ?><!--">-->
<!--                <img src="_images/fenlei-img6.png" alt="">-->
<!--                <p>旅游攻略 </p>-->
<!--            </a>-->
<!--        </li>-->
        <li>
            <a href="<?php echo url('travel/strategy',['type'=>2,'status'=>1]) ?>">
                <img src="_images/fenlei-img7.png" alt="">
                <p>活动问答 </p>
            </a>
        </li>
        <li>
            <a href="<?php echo url('travel/mate') ?>" >
                <img src="_images/fenlei-img8.png" alt="">
                <p>活动组团</p>
            </a>
        </li>
        <li>
            <a href="<?php echo url('travel/strategy',['type'=>4]) ?>">
                <img src="_images/fenlei-img9.png" alt="">
                <p>活动分享</p>
            </a>
        </li>
    </ul>
</div>
<hr class="bgcolor"/>
<!--旅游天地-->
<div class="index-main tourism-world">
    <div class="main-content tword-content">
        <div class="c-list">
            <?php foreach ($list as $v){?>
            <a class="list-item clearfix"
               <?php if(in_array($v['type'],[1,2,4])){?>
                href="<?php echo url('travel/strategy_detail',['id'=>$v['id'],'type'=>$v['type']])?>"
               <?php }elseif($v['type']==3){?>
                   href="<?php echo url('travel/mate_detail',['id'=>$v['id']])?>"
               <?php }?>
            >
                <div class="item-img fl">
                    <img src="<?php echo $v['user_head']?>" class="head-img"/>
                </div>
                <div class="item-detail fl">
                    <div class="detail1">
                        <span class="tag color1">
                            <?php if($v['type']==1) echo '旅游攻略'?>
                            <?php if($v['type']==2) echo '活动问答'?>
                            <?php if($v['type']==3) echo '活动组团'?>
                            <?php if($v['type']==4) echo '活动分享'?>
                        </span>
                        <p class="title pfbold one-txt-cut"><?php echo $v['title']?></p>
                    </div>
                    <div class="detail2">
                        <span><?php echo $v['appreciate']?> &nbsp;点赞</span>
                        <span><?php echo $v['comment']?> &nbsp;评论</span>
                    </div>
                    <div class="detail3">
                        <div class="text">
                            <?php echo $v['content']?>
                        </div>
                    </div>
                </div>
            </a>
            <?php }?>
        </div>
    </div>
</div>
</body>
</html>